#include "PrecompiledHeader.h"
#include "GlmHelper.h"

/*--------------------------------------------------------------------------*/

std::ostream& operator<<(std::ostream& out, const glm::vec2& vec)
{
	out << "{" << vec.x << " " << vec.y << "}";
	return out;
}

/*--------------------------------------------------------------------------*/

std::ostream& operator<<(std::ostream& out, const glm::vec3& vec)
{
	out << "{" << vec.x << " " << vec.y << " " << vec.z << "}";
	return out;
}

/*--------------------------------------------------------------------------*/

std::ostream& operator<<(std::ostream& out, const glm::vec4& vec)
{
	out << "{" << vec.x << " " << vec.y << " " << vec.z << " " << vec.w << "}";
	return out;
}

/*--------------------------------------------------------------------------*/

std::ostream& operator<<(std::ostream& out, const glm::ivec2& vec)
{
	out << "{" << vec.x << " " << vec.y << "}";
	return out;
}

/*--------------------------------------------------------------------------*/

std::ostream& operator<<(std::ostream& out, const glm::ivec3& vec)
{
	out << "{" << vec.x << " " << vec.y << " " << vec.z << "}";
	return out;
}

/*--------------------------------------------------------------------------*/

std::ostream& operator<<(std::ostream& out, const glm::ivec4& vec)
{
	out << "{" << vec.x << " " << vec.y << " " << vec.z << " " << vec.w << "}";
	return out;
}

/*--------------------------------------------------------------------------*/

std::ostream& operator<<(std::ostream& out, const glm::mat4& mat)
{
	out << "#c{";

	for (uint x = 0; x < 4; ++x)
	{
		for (uint y = 0; y < 4; ++y)
		{
			out << " " << mat[y][x]; //human friendly
		}

		if (x != 3)
		{
			out << "; ";
		}
		else
		{
			out << " }";
		}
	}

	return out;
}

/*--------------------------------------------------------------------------*/